/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cryptography;

import java.sql.Time;
import java.util.Date;

/**
 *
 * @author Tomasz Nowak
 */
public class BasicSaltGenerator implements ISaltGenerator
{
	@Override
	public byte[] generateSalt()
	{
		Date date = new Date();
		long seed = date.getTime();
		byte[] result = new byte[Long.SIZE / Byte.SIZE];
		for ( int i = 0; i < result.length; ++i )
		{
			result[i] = ( byte ) (seed % 256);
			seed >>= Byte.SIZE;
		}
		return result;
	}
}
